The Guerilla ribs and job scriptsΒΆ

To render in batch or on a render farm, Guerilla generates rib files and render job scripts. The rib files contain options, shaders, cameras, scene graphs. The job scripts are Lua wrappers that run the command line render with all options.

Rendering in batch and on the farm

Press the Render/Render Selected button in the Passes view. In a Python/Lua script, call the render function.

Generating render data

The render function generates job scripts, rib files and submit the renders to the batch/farm renderer. Use the following options to control its behaviour:

  • WriteScripts: generate the Lua job scripts
  • WriteFrameData: generate the rib files
  • DoSubmit: submit the render to the farm
  • DeferredRibGen: prepend a rib generation job before all other jobs

render uses default values for missing options, make sure you specify all relevant options when calling render.

Generating job scripts

Set the WriteScripts option to true:

import guerilla
options = {
    # prevent the deferred rib generation
    'DeferredRibGen': False,
    # write scripts now!
    'WriteScripts': True,
    # don't write ribs
    'WriteFrameData': False,
    # don't submit to the render farm
    'DoSubmit': False
}

guerilla.render ('none', options)

The scripts are written in the jobs folder next to the current scene. Use the JobsDirectory option to specify a different location.

The render function returns a list of scriptjob objects. These objects contain information on the name, the frames to render, the dependencies of each job, and the command line.

Generating ribs

Set the WriteFrameData option to true:

import guerilla
options = {
    # prevent the deferred rib generation
    'DeferredRibGen': False,
    # don't write scripts
    'WriteScripts': False,
    # write ribs now!
    'WriteFrameData': False,
    # don't submit to the render farm
    'DoSubmit': False
}

guerilla.render ('none', options)

The ribs are written in the ribs folder next to the current scene. Use th0 RibsDirectory option to specify a different location.

Deferring rib generation on the farm

Set the DeferredRibGen to true to defer the rib generation as another job. This job is executed before all other render jobs, and runs Guerilla to generate the rib files using the render function again. This option implies that WriteScripts is true and WriteFrameData.

import guerilla
options = {
    # do a deferred rib generation
    # don't specify WriteScripts nor WriteFrameData, these are automatically
    # deduced with the DeferredRibGen option.
    'DeferredRibGen': True
    # don't submit to the render farm
    'DoSubmit': False
}

guerilla.render ('none', options)

Executing job scripts

The jobs generated by Guerilla to run on the renderfarm (or in batch render) are Lua scripts which execute various commands. Those scripts must be interpreted with the Guerilla's lua interpreter. This interpreter is in the Guerilla install directory.

This job script takes the following arguments :

  • --frame=123 : render the frame 123.
  • --aov=regexp : if one or more --aov argument is present, render only the AOVs with a name matching the regexp regular expression. The AOV name syntax is RenderPass/Layer/AOV. ^RenderPass/ will render all the AOVs of the RenderPass render pass. Beauty$ will render all the Beauty AOVs.